﻿using Xunit;

namespace Gamemaster.Console
{
    public class NameCommandTests
    {
        [Fact]
        public void MaleArgSetsMaleProperty()
        {
            NameCommand command = new NameCommand("name", "male");

            Assert.True(command.Male);
        }

        [Fact]
        public void FemaleArgSetFemaleProperty()
        {
            NameCommand command = new NameCommand("name", "female");

            Assert.True(command.Female);
        }

        [Fact]
        public void BothArgSetsMaleAndFemaleProperties()
        {
            NameCommand command = new NameCommand("name", "both");

            Assert.True(command.Female);
            Assert.True(command.Male);
        }

        [Fact]
        public void QuantityArgSetsQuantityProperty()
        {
            NameCommand command = new NameCommand("name", "10");

            Assert.Equal(10, command.Quantity);
        }

        [Fact]
        public void ExecuteGeneratesCorrectNumberOfNames()
        {
            NameCommand command = new NameCommand("name", "10");

            command.Execute();

            Assert.Equal(10, command.NamesGenerated.Count);
        }
    }
}
